package com.imufe.chemicalenterprisedangerwarning.entity.query;

import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;

/**
 * @author BaiBan
 * @since 2022/10/5
 */
@ApiModel("检查条目请求")
@Data
public class CheckItemQuery {

    @ApiModelProperty("条目编号")
    @Null(message = "创建时条目编号不能填", groups = CreateGroup.class)
    @NotNull(message = "修改时条目编号必须填", groups = UpdateGroup.class)
    private Long id;

    @ApiModelProperty("条目出处来源")
    @NotNull(message = "条目出处来源不能为空", groups = CreateGroup.class)
    private String source;

    @ApiModelProperty("条目来源编号，第XX条这种")
    @NotNull(message = "条目来源编号不能为空，第XX条这种", groups = CreateGroup.class)
    private Integer itemId;

    @ApiModelProperty("条目内容")
    private String content;

    @ApiModelProperty("隐患分类;0-符合项;1-一般隐患;2-重大隐患;")
    private Integer hazardLevel;

    @ApiModelProperty("是否废弃, 只许修改")
    @Null(message = "新增条目时，不废弃，不用填", groups = CreateGroup.class)
    private Boolean discard;
}
